<script src="./vue.js"></script>
    <div id="app">
        <button @click="add">添加</button>
        <table border="1">
            <tr>
                <td>工号</td>
                <td>姓名</td>
                <td>联系电话</td>
                <td>操作</td>

            </tr>
            <tr v-for="item in terlist">
                <td>{{item.cord}}</td>
                <td>{{item.unmane}}</td>
                <td>{{item.tel}}</td>
                <td>
                    <button @ckick="update">修改</button>
                    <button @ckick="del">删除</button>
                </td>
            </tr>
        </table>

    </div>
    <script>
        var vue=new Vue({
            el:'#app',
            data: {
               strList:[],
            },
            methods:{
                add(){
                   console.log("进入添加方法");
                   var terache={
                    cord:"001",
                    uname:"李老师"
                    tel:"1382117765"
                   }
                    
                    this.terlist.push(terache);
                },
                update(){
                    alert("准备开始更新数据");
                },
                del(){
                    this.terList.pop();
                }
            }
        })
    </script>
   